<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreatePayRecordTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('pay_record', function (Blueprint $table) {
            $table->increments('id');
            $table->string('username');                              // 充值账号
            $table->string('pay_type');                             // 充值类型
            $table->string('out_trade_no');                         // 订单号
            $table->string('trade_no')->nullable();                 // 交易号
            $table->decimal('total_amount', 8, 2);					// 充值金额
            $table->timestamp('created_at');                        // 创建时间
            $table->string('trade_status');                         // 交易状态
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('pay_record');
    }
}
